﻿@model IEnumerable<JinianNet.JNCms.Models.Links>
<!DOCTYPE html>
<html>
<head>
    <title>友情链接 - @JinianNet.JNCms.Config.Site.Name</title>
    @JinianNet.Web.ResourceManager.Script.Render("Manage/Base")
    @JinianNet.Web.ResourceManager.Style.Render("Manage/Base")
</head>
<body>
    <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="right">@Html.DropDownList("ClassID") <input type="button" value=" GO " onclick="location.href='/Manage/Links/List/'+document.getElementById('ClassID').value" /></td>
        </tr>
    </table>
    <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0" class="grid top">
        <tr>
            <th width="50">编号</th>
            <th>分类</th>
            <th>网站</th>
            <th>链接</th>
            <th width="50">排序</th>
            <th width="100">添加时间</th>
            <th width="150">操作</th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td align="center">@item.ID</td>
                <td align="center">
                    @(((SelectList)ViewData["ClassID"]).Single(m => m.Value == item.ClassID.ToString()).Text)
                </td>
                <td>&nbsp;&nbsp;
                    @if (item.HasLogo)
                    {
                        <a href="@item.Url"><img src="@item.Src" width="88" height="31" alt="@item.Title" border="0" /></a>
                    }
                    else
                    {
                        <a href="@item.Url">@item.Title</a>
                    }
                </td>
                <td>&nbsp;&nbsp;@item.Url</td>
                <td align="center">@item.Rank</td>
                <td align="center">@item.CreateTime.ToString("yy年MM月dd")</td>
                <td align="center"><a href="@item.Url" target="_blank">访问</a> <a href="/Manage/Links/Edit/@item.ID">编辑</a> <a href="/Manage/Links/Delete/@item.ID" onclick="return confirm('您确定要进行删除操作吗？')">删除</a></td>
            </tr>
        }
    </table>
</body>
</html>